<template>
	<view>
		<text class="dot" :class="{wave:active}" :style="{backgroundColor,width:size+'upx',height:size+'upx'}"></text>
	</view>
</template>

<script>
	export default {
		props:{
			active:{
				type:Boolean,
				default:false
			},
			backgroundColor:{
				type:String,
				default:"#333333"
			},
			size:{
				type:[Number,String],
				default:15
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			
		}
	}
</script>

<style scoped>
	
	.dot{
		position: relative;
		display: inline-block;
		border-radius: 50%;
	}
	
	.wave::after{
		position: absolute;
		left: 50%;
		top: 50%;
		transform: translate(-50%,-50%);
		content: "";
		background-color: inherit;
		border-radius: 50%;
		opacity: 0.4;
		animation: wave 1.4s ease-in-out alternate forwards infinite;
	}
	
	@keyframes wave{
		from{
			width: 15upx;
			height: 15upx;
		}
		to{
			width: 24upx;
			height: 24upx;
		}
	}
	
</style>
